<div class="teacher-item">
  <div class="teacher-top">
    <a class="teacher-img" href="{{ path('user_show', {id:teacher.id}) }}">
      <img class="avatar-lg" src="{{ filepath(teacher.largeAvatar, 'avatar.png') }}" alt="">
    </a>
    <h3 class="title">
      <a class="link-dark" href="{{ path('user_show', {id:teacher.id}) }}">{{ teacher.nickname }}</a>
    </h3>
    <div class="position">
      {% if teacher.title %}
        {{ teacher.title }}
      {% else %}
        {{'user.fields.no_title'|trans}}
      {% endif %}
    </div>
  </div>
  <div class="teacher-bottom">
    <div class="about">
      {% if profile.about %}
        {{ profile.about|plain_text(30) }}
      {% else %}
        {{'user.fields.no_introduction'|trans}}
      {% endif %}
    </div>
    <div class="metas">
      {% if not app.user or (teacher.id != app.user.id) %}
        <a class="btn btn-primary btn-sm follow-btn" href="javascript:;" data-url="{{ path('user_follow', {id:teacher.id}) }}" {% if isFollowed %} style="display:none;"{% endif %} data-loggedin={% if app.user and app.user.isLogin() %}"1"{% else %}"0"{% endif %}>{{'user.btn.following'|trans}}</a>
        <a class="btn btn-default btn-sm unfollow-btn" href="javascript:;" data-url="{{ path('user_unfollow', {id:teacher.id}) }}" {% if not isFollowed %} style="display:none;" {% endif %}>{{'user.btn.followed'|trans}}</a>
        {% if can_send_message(teacher.id) %}
          <a class="btn btn-default btn-sm" data-toggle="modal" data-target="#modal" data-backdrop="static"  data-url="{{path('message_create', {toId:teacher.id})}}">{{'user.btn.send_message'|trans}}</a>
        {% endif %}
      {% endif %}
    </div>
  </div>
</div>
